package org.stvd.common.workflow.enums;

import java.util.LinkedHashMap;

public enum MessageEnum {

	/** 已删除：-1*/
	Delete("已删除","-1"),
	
	/** 待查阅：00*/
	Wait("待查阅","00"),
	
	/** 已查阅：10*/
	Consult("已查阅","10"),
	
	/** 已回复：11*/
	Reply("已回复","11");
	
	// 成员变量
    private String text;
    private String value;

    // 构造方法
    private MessageEnum(String text, String value) {
        this.text = text;
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public String getValue() {
        return value;
    }

    public static String getName(String value) {
        for (MessageEnum status : MessageEnum.values()) {
            if (value.equals(status.getValue())) {
                return status.getText();
            }
        }
        return null;
    }

    public static LinkedHashMap<String, String> messageMap = new LinkedHashMap<String, String>();
    static {
        for (MessageEnum status : MessageEnum.values()) {
        	messageMap.put(status.getValue(), status.getText());
        }
    }
}
